---
title: "Balancing algorithm report"
output:
  html_document:
    df_print: paged
editor_options:
  chunk_output_type: console
---

```{r,message=FALSE,echo=FALSE}
library(dplyr)
```

```{r,echo=FALSE}
# Supply a "MyData.csv" to the directory,
# where column 1 of csv is the ID
clean <- read.csv("lithuania_clean.csv")
MyData=clean
MyData=select(MyData,Record.ID,joint,pol,sex,vot)
write.csv(MyData,"MyData.csv",row.names = F)
MyData <- read.csv("MyData.csv")
```

# Python (config = code) 
```{python engine.path="/usr/bin/python3.5",results='hide'}
import sys
sys.path.append('/home/shared/data/balancing/')
import drop
config = "{1: {'degreeHigh':7.8,'noDegreeHigh':42.1,'degreeLow':20.5,'noDegreeLow':29.6}},{2: {'interest':40.7,'LowInterest':59.3}},{3: {'Male':50.0,'Female':50.0}},{4: {'TS-LKD':15.00,'LSDP':14.85,'LRLS':14.24,'TT':12.26,'DP':11.03,'LLRA':6.93,'LVZS':5.69,'Undec':20.00}}"


filename = '/home/fernando/Misc/bjpolFinal/Lithuania/MyData.csv'

drop.run(config, filename, "/home/fernando/Misc/bjpolFinal/Lithuania/myBal", 60)
```
